//
//  SIXMeNewfriendVC.m
//  weibo
//
//  Created by YaRi on 16/5/21.
//  Copyright © 2016年 chuhan. All rights reserved.
//

#import "SIXMeNewfriendVC.h"

@interface SIXMeNewfriendVC ()

@end

@implementation SIXMeNewfriendVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self navdefault];

    
}

#pragma mark - navdefault 导航控制器配置
- (void)navdefault{
    
    self.navigationItem.title = @"新的好友";
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationController.navigationBar.tintColor = [UIColor grayColor];
    
    UIBarButtonItem *right = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"navigationbar_more"] style:UIBarButtonItemStyleDone target:self action:@selector(pop)];
    
    self.navigationItem.rightBarButtonItem = right;
}

//弹出
- (void)pop{
    //第一步:创建控制器
    UIAlertController *alerVC = [[UIAlertController alloc] init];
    
    //第二步:创建按钮
    UIAlertAction *action = [UIAlertAction actionWithTitle:@"刷新" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
        //返回上一级
        //        [self.navigationController popViewControllerAnimated:YES];
    }];
    //注意:一个UIAlerController 里面只能有一个取消UIAlertaction
    UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        
    }];
    
    UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"返回首页" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        
    }];
    
    //第三步,添加按钮
    [alerVC addAction:action];
    [alerVC addAction:action1];
    [alerVC addAction:action2];
    
    //第四步:显示弹窗.(相当于show操作)
    [self presentViewController:alerVC animated:YES completion:nil ];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
